package com.ug.system.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ug.common.utils.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @Author LY
 * @create 2024/7/16 15:25
 * @Description 菜单实体类
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "sys_menu")
public class SysMenu extends BaseEntity {

    /**
     * 主键id
     */
    @TableId(value = "menu_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long menuId;

    /**
     * 菜单名称
     */
    private String name;

    /**
     * 访问url地址
     */
    private String path;

    /**
     * 父ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    /**
     * 排序
     */
    private int sort;

    /**
     * 类型（1菜单 2页面 3按钮）
     */
    private String type;

    /**
     * 页面地址存放路径
     */
    private String component;

    /**
     * 权限标识
     */
    private String permission;

    /**
     * 图标
     */
    private String icon;
}
